package com.itheima.exception;

public class ArrayException {
    public static void main(String[] args) {
        int[] arr = new int[3];     // 0 1 2
//        System.out.println(arr[10]);      // ArrayIndexOutOfBoundsException

        // 控指针异常
        arr = null;
//        System.out.println(arr[0]);       // NullPointerException
    }
}
